
import React, { Component } from 'react'
import { str } from '@/utils'
import { MyTestableClass, MyTestable, MyTest, MyTest1, Example } from "../utils";

const func = (Component: any) => class extends React.Component {
  render() {
    return <div style={{cursor: 'pointer', display: 'inline-block', background: 'skyblue'}}>
      <Component/>
    </div>
  }
}

// @ts-ignore
// @func
export default class index extends Component {
  componentDidMount(): void {
    // @ts-ignore
    console.log(MyTestableClass.isTestable);
    // // @ts-ignore
    // console.log(MyTest.isTestable, 'MyTest-true');
    // // @ts-ignore
    // console.log(MyTest1.isTestable, 'MyTest-false');

    // const table = new MyTestable();
    // // @ts-ignore
    // console.log(table.isTestable, 'MyTestable');

    const example = new Example();
    // example.method()
  }

  render() {
    return (
      <div style={{border: '1px solid #ccc', width: 300, height: 100, lineHeight: '100px', textAlign:'center', color: '#fff'}}>
        {str}
      </div>
    )
  }
}

